package test;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Author wangtengyu
 * @Create 2018-06-05-15:00
 */
public class StreamTest2 {

    public static void main(String[] args) {
        List<Integer> numbers1= Arrays.asList(1,2,3);
        List<Integer> numbers2= Arrays.asList(4,5);
        List<int[]> mapList=numbers1.stream().
                flatMap(i-> numbers2.stream()
                        .map(j-> new int[]{i,j}))
                .collect(Collectors.toList());

    }
}
